<div class="page_header clearfix" style="padding-bottom:10px;">
    <h1><?php echo $cms->name ?></h1>
</div>
<div class="page_content">
	<div style="text-align:left; padding-left:40px;">
		<span class='st_facebook_large' displayText='Facebook'></span>
		<span class='st_googleplus_large' displayText='Google +'></span>
		<span class='st_twitter_large' displayText='Tweet'></span>
		<span class='st_email_large' displayText='Email'></span>
		<span class='st_fblike_large' displayText='Facebook Like'></span>
	</div>
    <div class="page_section" style="padding-top:5px;">
        <p class="page_intro" style="margin-top:5px;">
            <strong><?php echo htmlspecialchars_decode($cms->description) ?></strong>
        </p>
        <p>
        	<?php echo htmlspecialchars_decode($cms->content) ?>
        </p>
		<div class="fb-comments" data-href="http://www.vtns.vn<? echo url_for('news/permalink?cms_category_id='.$cms->cms_category_id.'&cms_id='.$cms->cms_id.'-'.vtnsSEO::getPermalink($cms->name))?>" data-num-posts="4" data-width="658"></div>
		<?php
			if (isset($cms_olders)) {
		?>
		<div class="link_black">
			<div><h3 style="margin:0;margin-bottom:5px;color:#6d1384;">Những tin cũ hơn</h3></div>
		<?php
			foreach ($cms_olders as $cms_older)
			{
			?>
				<div style="font-size:12px; ">&raquo; 
					<a rel="<?=$cms_older['name']?>" href='<? echo url_for('news/permalink?cms_category_id='.$cms_older['cms_category_id'].'&cms_id='.$cms_older['cms_id'].'-'.vtnsSEO::getPermalink($cms_older['name']))?>'>
						<?=$cms_older['name']?>
					</a> 
					<span style="font-style:oblique; font-size:11px; color:#aaa">(<?php echo format_date($cms_older['created_at'], "d")?>)</span>
				</div>
			<?
			}
		?>
		</div>
		<?php
		}
		?>
    </div>
	<?php
	if (isset($cms_tags) && sizeof($cms_tags) > 0)
	{
	?>
	<div style="padding:7px 7px; background:#eee" class="link_black">
		<img src="/images/tag.png" />
		<?php
			$count = 0;
			foreach ($cms_tags as $tag_object) {
				$count ++;
				if ($count > 1) echo ", ";
				echo "<a href='".url_for('news/permalink?tag_id='.$tag_object->id."-".vtnsSEO::getPermalink($tag_object->tag))."'>".$tag_object->tag."</a>";
			}
		?>
	</div>
	<?php 
	}
	?>
</div>